/* eslint-disable @typescript-eslint/no-explicit-any */
import { reactive, onMounted } from "vue";
import axios from "axios";
export default function () {
    const dogList = reactive<any>([]);
    async function getDog() {
        try {
            const result = await axios.get(
                "https://dog.ceo/api/breed/pembroke/images/random"
            );
            dogList.push(result.data.message);
        } catch (error) {
            console.log(error)
        }   
    }
    onMounted(() => {
        getDog();
    });
    return { dogList, getDog }
}